<?php 
/**
 *模型属性model类
 * @Author    紫梦
 * @DateTime  2017-11-04
 * @copyright 响响租车
 * @version   1.0
 */
namespace app\common\model;
use think\Model;

class CarAttribute extends Model
{
    
    public function getAttrValuesAttr($value)
    {
            $attr = preg_replace("/\s/",",",$value);
            $arr = explode(',', $attr);
        return $arr;
    }

    public function carType()
    {
        return $this->hasOne('CarType','id','type_id');
    }
        
}